What is Conditional Probability?

Illustrative Example

Example 1

A botanist is studying how different fertilizers affect plant growth. She records whether plants grew successfully and whether they received fertilizer. The results are summarized in the table below:

Plant Growth and Fertilizer Use
Plant Growth Fertilizer Used No Fertilizer Total
Grew Successfully 85 40 125
Did Not Grow 30 45 75
Total 115 85 200
  • Part A: If a plant is randomly selected from the study, what is the probability that it grew successfully?
  • Part B: If a plant is randomly selected from those that received fertilizer, what is the probability that it grew successfully?

Solution

  • Part A: The probability that a randomly selected plant grew successfully is calculated by dividing the number of plants that grew successfully by the total number of plants: 
    \[ \begin{align*}P(\text{Grew Successfully}) &= \frac{n(\text{Grew Successfully})}{n(\text{{Total}})}\\&= \frac{{125}}{{200}}\\\\ &= 0.625\end{align*} \]
    Thus, the probability that a randomly selected plant grew successfully is 0.625.
  • Part B: The probability that a plant grew successfully given that it received fertilizer is found by focusing only on plants that received fertilizer.
    Plant Growth and Fertilizer Use
    Plant Growth Fertilizer Used
    Grew Successfully 85
    Did Not Grow 30
    Total 115
    Notice that the sample space has been redefined from the original 200 plants to the 115 plants where fertilizer was used.  In terms of the table, we ignore all the columns and just focus on the column "Fertilier Used."  We compute the probability as normal with this new sample space, but notice that the notation used still refers to the original table:
    \[\begin{align*} P(\text{Grew Successfully if Fertilizer Used}) &= \frac{n(\text{Grew Successfully and Fertilizer Used})}{n(\text{Fertilizer Used})}\\\\&= \frac{{85}}{{115}}\\\\& \approx 0.739\end{align*} \]
    Thus, the probability that a plant grew successfully given that it received fertilizer is 0.739.

$$\tag*{\(\blacksquare\)}$$

Conditional Probability

What Is Conditional Probability?

Conditional probability refers to the probability of an event occurring given that another event has already happened. It is written as \( P(A \mid B) \), meaning "the probability of event \( A \) given event \( B \) occurred" or "the probability of event \(A\) if event \(B\) occurred." The formula for conditional probability is: \[ P(A \mid B) = \frac{P(A \text{ and } B)}{P(B)} \]

Example 2

A biologist is studying whether certain insect species are more likely to be nocturnal. She observes two types of insects (Moths and Beetles) and records whether they are active during the night or during the day. The results are summarized in the table below:

Insect Species and Nocturnal Behavior
Insect Type Nocturnal Diurnal Total
Moth 120 30 150
Beetle 40 60 100
Total 160 90 250
  • Part A: Use the definition of conditional probability to compute \(P(\text{{Nocturnal}}\mid\text{{Moth}})\).
  • Part B: An insect is randomly selected from the group that is a moth. What is the probability that it is nocturnal, given that it is a moth?

Solution

  • Part A: We first have to make two preliminary calculations: \(P(\text{{Moth}})\) and \(P(\text{Nocturnal and Moth})\):
    \[ \begin{align*} P(\text{{Moth}}) & = \frac{n(\text{{Moth}})}{n(\text{{Total}})} \\\\ & = \frac{{150}}{{250}} \\\\ & = 0.6 \end{align*} \]
    \[ \begin{align*} P(\text{Nocturnal and Moth})&=\dfrac{n(\text{Nocturnal and Moth})}{\text{{Total}}} \\\\&=\dfrac{{120}}{{250}}\\\\&=0.48\end{align*}\]
    Now, we can use the definition to compute the conditional probabiltiy:
    \[\begin{align*}P(\text{{Nocturnal}}\mid\text{{Moth}})&=\dfrac{P(\text{Nocturnal and Moth})}{P(\text{{Moth}})}\\\\&=\dfrac{0.48}{0.60}\\\\&=0.8\end{align*}\]
    Thus, the probability that a randomly selected moth is nocturnal is 0.8.
  • Part B: The probability that a randomly selected insect is nocturnal, given that it is a moth, is found by focusing only on moths.
    Insect Species and Nocturnal Behavior
    Insect Type Nocturnal Diurnal Total
    Moth 120 30 150
    Notice that the sample space has been redefined from the original 250 insects to the 150 moths observed. In terms of the table, we ignore all rows except for "Moth." We compute the probability as normal with this new sample space, but the notation still refers to the original table:
    \[ \begin{align*} P(\text{{Nocturnal}} \mid \text{{Moth}}) & = \frac{n(\text{Nocturnal and Moth})}{n(\text{{Moth}})} \\\\ & = \frac{{120}}{{150}} \\\\ & = 0.8 \end{align*} \]
    Thus, the probability that an insect is nocturnal given that it is a moth is 0.8.

$$\tag*{\(\blacksquare\)}$$

Example 3

A person has a drawer with socks containing 6 white socks and 4 black socks. They randomly pick one sock, look at it, and then randomly pick a second sock without replacing the first one. If the first sock picked is white, what is the probability that the second sock picked is also white?

Solution

After picking the initial white sock, there are now 5 white socks remaining, the 4 initial black socks, and the remain sock total is now reduced to 9.  The probability of picking a white sock as the second sock, given that the first sock was also white, is calculated the same way as any other probability; we simply use the updated numbers instead of the original ones. 
\[ \begin{align*} P(\text{Second Sock White} \mid \text{First Sock White}) & = \frac{n(\text{Remaining White Socks})}{n(\text{Remaining Total Socks})} \\\\ & = \frac{{5}}{{9}} \\\\ & \approx 0.556 \end{align*} \]
Thus, the probability that the second sock picked is also white, given that the first sock picked was white, is 0.556.

$$\tag*{\(\blacksquare\)}$$